package org.csu.chatserver.result;


import lombok.Getter;

@Getter
public enum ResponseCode {

    SUCCESS(0,"SUCCESS"),
    ERROR(1,"ERROR"),


    UserRegisterSuccess(10000,"注册成功"),
    UserLoginSuccess(10001,"登陆成功"),
    UserLoginOutSuccess(10002,"登出成功"),
    UserEditSuccess(10003,"用户更新信息成功"),
    GetCaptchaSuccess(10004,"生成验证码成功"),
    UserGetSuccess(10005,"获取用户信息成功"),
    UserPasswordChangeSuccess(10006,"修改密码成功"),
    UserPasswordCorrectSuccess(10007, "原密码正确"),
    UserPasswordIncorrectSuccess(10008,"原密码错误"),
//    UserEditSuccess(10003,"用户更新信息成功"),


    GetCategoryVOSuccess(10010,"获取CategoryVO成功"),
    GetProductVOSuccess(10011,"获取ProductVO成功"),
    GetItemVOSuccess(10012,"获取ItemVO成功"),
    GetSearchMessageSuccess(10013,"获取搜索信息成功"),
    GetCategoriesVOSuccess(10014,"获取CategoriesVO成功"),
    GetInfoWindowCategorySuccess(10015,"获取InfoWindowCategoryVO成功"),


    GetHTTPUrlSuccess(10020,"获取网络图片url成功"),

    GetCartSuccess(10030,"获取购物车信息成功"),
    AddItemToCartSuccess(10031,"添加商品进入购物车成功"),
    UpdateCartSuccess(10032,"更新购物车成功成功"),
    DeleteItemFromCartSuccess(10033,"从购物车中删除商品成功"),
    InventoryShortageSuccess(10034,"库存不足"),

    ConfirmOrderSuccess(10040,"确认订单成功"),




    MissingParam(20000,"缺少参数"),
    Duplicate(20001,"用户名或分类或商品已存在"),
    Invalid(20002,"用户名或密码格式错误"),

    UserNameOrPasswordError(30000,"用户名或密码错误"),
    UserLoginCaptchaError(30001,"验证码错误"),
    UserLoginPhoneError(30002,"没有找到该手机号"),

    UserNameOrPasswordNotNull(30003,"用户名或密码格式错误"),

    ;

    private final int code;
    private final String description;

    ResponseCode(int code, String description) {
        this.code = code;
        this.description = description;
    }

}
